See also: UIApplicationDelegate
documentation
// AppDelegate.swift
@UIApplicationMain
final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
See also: UIApplicationDelegate
documentation
// AppDelegate.swift
@UIApplicationMain
final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
Header will need to be set to sticky and overlay by default.
Simply add this script to your global JS or enque as a seperate script file.
/** | |
* Find all Vue components that match the given matcher and return them in an array. | |
* @param parent The parent component to search. | |
* @param matcher The matcher to use. | |
* @returns An array of components that match the given matcher. | |
*/ | |
export const findVueChildComponents = (parent: any, matcher: RegExp | String | undefined) => { | |
const found: any[] = []; | |
const root = parent.$.subTree; |
const push = async (file, fileName) => { | |
const client = new aws.SecretsManager(); | |
const spURL = `https://<your site>.sharepoint.com/sites/<your specific subsite>/_api/web/GetFolderByServerRelativeUrl('Documents')/Files/Add(url='${fileName}', overwrite=true)`; | |
try { | |
const data = await client.getSecretValue({ SecretId: '<whatever you called your secret>' }).promise(); | |
const secret = JSON.parse(data.SecretString).<whatever you called your secret>; | |
const getToken = await axios.post('https://accounts.accesscontrol.windows.net/<sharepoint resource id>/tokens/OAuth/2', | |
querystring.stringify({ | |
grant_type: 'client_credentials', | |
client_id: '<ask your sharepoint person for this it's a something@tenant id>', |
iperf3
serverwg-quick down wg0
/etc/wireguard/wg0.conf
file# import nothing | |
""" | |
Tested in cpython 3.6, 3.8 (from the arch repos) on 64-bit arch linux | |
""" | |
nullfunc = lambda: None | |
#from types import CodeType, FunctionType | |
CodeType = nullfunc.__code__.__class__ | |
FunctionType = nullfunc.__class__ |
In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.
In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:
low
: the cheapestmedium
: moderate# This script will explain how to transfer a file to EC2 using SSM ONLY! | |
# You will need to have permission to run SSM commands on the target machine and have sudo access as well | |
# Infos | |
INSTANCE_ID=i-1234567890 | |
FILE_NAME=the_file.tar.gz | |
# Step 1: Run command on machine to install netcat and dump from port to filename | |
# < Start session |
Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:
project-root/
├── cmd/
│ ├── your-app-name/
│ │ ├── main.go # Application entry point
│ │ └── ... # Other application-specific files